package com.chen.retrofitdemo.net;

import android.content.Context;


public class HttpUtils {
    private static final String TAG = "HttpClientManager";
    private static HttpUtils instance;
    private Context context;
    private RetrofitClient client;

    private HttpUtils(Context context) {
        this.context = context;
        client = new RetrofitClient(context, "http://192.168.0.102:8080/");
    }

    public static HttpUtils getInstance(Context context) {
        if (instance == null) {
            synchronized (HttpUtils.class) {
                if (instance == null) {
                    instance = new HttpUtils(context);
                }
            }
        }

        return instance;
    }

    public RetrofitClient getClient() {
        return client;
    }
}
